import request from '@/utils/request'

// 查询退役军人权益维护信息列表
export function listDeclare(query) {
  return request({
    url: '/comprehensive/declare/list',
    method: 'get',
    params: query
  })
}

// 查询退役军人权益维护信息详细
export function getDeclare(declareId) {
  return request({
    url: '/comprehensive/declare/' + declareId,
    method: 'get'
  })
}

// 新增退役军人权益维护信息
export function addDeclare(data) {
  return request({
    url: '/comprehensive/declare',
    method: 'post',
    data: data
  })
}

// 修改退役军人权益维护信息
export function updateDeclare(data) {
  return request({
    url: '/comprehensive/declare',
    method: 'put',
    data: data
  })
}

// 删除退役军人权益维护信息
export function delDeclare(declareId) {
  return request({
    url: '/comprehensive/declare/' + declareId,
    method: 'delete'
  })
}

// 导出退役军人权益维护信息
export function exportDeclare(query) {
  return request({
    url: '/comprehensive/declare/export',
    method: 'get',
    params: query
  })
}


// 提交申报 post  /comprehensive/declare/commit？id=${id}
export function submit(id) {
  return request({
    url: '/comprehensive/declare/commit?id='+id,
    method: 'post',
  })
}


// 完结 post  /comprehensive/declare/end？id=${id}
export function end(id) {
  return request({
    url: '/comprehensive/declare/end?id='+id,
    method: 'post',
  })
}
